From 1fe49007f3af282380409e4ec6efca69e24699b6 Mon Sep 17 00:00:00 2001 From: "emellor@ewan" Date: Wed, 21 Sep 2005 15:12:32 +0100 Subject: [PATCH] Match change to the memory/target value, as it is now in KiB, not bytes. Signed-off-by: Ewan Mellor --- linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c b/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c index 521252c8ce..d720e7d2ea 100644 --- a/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c +++ b/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c @@ -362,7 +362,10 @@ static void watch_target(struct xenbus_watch *watch, const char *node) return; } - set_new_target(new_target >> PAGE_SHIFT); + /* The given memory/target value is in KiB, so it needs converting to + pages. PAGE_SHIFT converts bytes to pages, hence PAGE_SHIFT - 10. + */ + set_new_target(new_target >> (PAGE_SHIFT - 10)); } -- 2.30.2